package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.system.domain.ProFile;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.ArrayList;
import java.util.Date;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 执行记录业务对象 pro_process
 *
 * @author ruoyi
 * @date 2023-05-07
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ProProcessBo extends BaseEntity {

    /**
     * 执行ID
     */
    @NotNull(message = "执行ID不能为空", groups = { EditGroup.class })
    private Long processId;

    /**
     * 任务ID
     */
    @NotNull(message = "任务ID不能为空", groups = { EditGroup.class })
    private Long taskId;

    /**
     * 项目ID
     */
    @NotNull(message = "项目ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long subjectId;

    /**
     * 项目编号
     */
    @NotBlank(message = "项目编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String subjectNo;

    /**
     * 描述
     */
    @NotBlank(message = "描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String desp;

    /**
     * 开始时间
     */
    @NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;

    /**
     * 计划完成时间
     */
    @NotNull(message = "计划完成时间不能为空", groups = { AddGroup.class, EditGroup.class })
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date pfinishDate;

    /**
     * 执行状态
     */
    private String status;

    private String filePath;

    /**
     * 项目进度
     */
    @NotNull(message = "项目进度不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long rate;


    private List<ProFile> fileList = new ArrayList<>();

}
